package com.tcl.aota.admin.dto;


import org.apache.commons.lang.StringUtils;

import java.util.HashMap;
import java.util.Map;

public class PackageDTO {
	private String packageName;
	private String createTime;
	private Integer quantity;//app数量
	private String releaseTime;

	public String getPackageName() {
		return packageName;
	}

	public void setPackageName(String packageName) {
		this.packageName = packageName;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public String getReleaseTime() {
        return releaseTime;
    }

    public void setReleaseTime(String releaseTime) {
        this.releaseTime = releaseTime;
    }

    public Map<String, Object> toMap() {
		Map<String, Object> condition = new HashMap<>();
    if(!StringUtils.isEmpty(packageName)){
        condition.put("packageName", this.packageName);
    }
    if(!StringUtils.isEmpty(createTime)){
        condition.put("createTime", this.createTime);
    }
    if(quantity!=null){
        condition.put("quantity", this.quantity);
    }
    if(!StringUtils.isEmpty(releaseTime)){
        condition.put("releaseTime", this.releaseTime);
    }
		return condition;
	}
}
